use crate::verify::Params;

pub(crate) struct TestVector {
    pub(crate) params: Params,
    pub(crate) input: &'static [u8],
    pub(crate) nonce: [u8; 32],
    pub(crate) solutions: &'static [&'static [u32]],
}

pub(crate) const VALID_TEST_VECTORS: &[TestVector] = &[
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"block header",
        nonce: [0; 32],
        solutions: &[
            &[
                976, 126621, 100174, 123328, 38477, 105390, 38834, 90500, 6411, 116489, 51107,
                129167, 25557, 92292, 38525, 56514, 1110, 98024, 15426, 74455, 3185, 84007, 24328,
                36473, 17427, 129451, 27556, 119967, 31704, 62448, 110460, 117894,
            ],
            &[
                1008, 18280, 34711, 57439, 3903, 104059, 81195, 95931, 58336, 118687, 67931,
                123026, 64235, 95595, 84355, 122946, 8131, 88988, 45130, 58986, 59899, 78278,
                94769, 118158, 25569, 106598, 44224, 96285, 54009, 67246, 85039, 127667,
            ],
            &[
                1278, 107636, 80519, 127719, 19716, 130440, 83752, 121810, 15337, 106305, 96940,
                117036, 46903, 101115, 82294, 118709, 4915, 70826, 40826, 79883, 37902, 95324,
                101092, 112254, 15536, 68760, 68493, 125640, 67620, 108562, 68035, 93430,
            ],
            &[
                3976, 108868, 80426, 109742, 33354, 55962, 68338, 80112, 26648, 28006, 64679,
                130709, 41182, 126811, 56563, 129040, 4013, 80357, 38063, 91241, 30768, 72264,
                97338, 124455, 5607, 36901, 67672, 87377, 17841, 66985, 77087, 85291,
            ],
            &[
                5970, 21862, 34861, 102517, 11849, 104563, 91620, 110653, 7619, 52100, 21162,
                112513, 74964, 79553, 105558, 127256, 21905, 112672, 81803, 92086, 43695, 97911,
                66587, 104119, 29017, 61613, 97690, 106345, 47428, 98460, 53655, 109002,
            ],
        ],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"block header",
        nonce: [
            1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            1911, 96020, 94086, 96830, 7895, 51522, 56142, 62444, 15441, 100732, 48983, 64776,
            27781, 85932, 101138, 114362, 4497, 14199, 36249, 41817, 23995, 93888, 35798, 96337,
            5530, 82377, 66438, 85247, 39332, 78978, 83015, 123505,
        ]],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"block header",
        nonce: [
            2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            165, 27290, 87424, 123403, 5344, 35125, 49154, 108221, 8882, 90328, 77359, 92348,
            54692, 81690, 115200, 121929, 18968, 122421, 32882, 128517, 56629, 88083, 88022,
            102461, 35665, 62833, 95988, 114502, 39965, 119818, 45010, 94889,
        ]],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"block header",
        nonce: [
            10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                1855, 37525, 81472, 112062, 11831, 38873, 45382, 82417, 11571, 47965, 71385,
                119369, 13049, 64810, 26995, 34659, 6423, 67533, 88972, 105540, 30672, 80244,
                39493, 94598, 17858, 78496, 35376, 118645, 50186, 51838, 70421, 103703,
            ],
            &[
                3671, 125813, 31502, 78587, 25500, 83138, 74685, 98796, 8873, 119842, 21142, 55332,
                25571, 122204, 31433, 80719, 3955, 49477, 4225, 129562, 11837, 21530, 75841,
                120644, 4653, 101217, 19230, 113175, 16322, 24384, 21271, 96965,
            ],
        ],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"block header",
        nonce: [
            11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            2570, 20946, 61727, 130667, 16426, 62291, 107177, 112384, 18464, 125099, 120313,
            127545, 35035, 73082, 118591, 120800, 13800, 32837, 23607, 86516, 17339, 114578, 22053,
            85510, 14913, 42826, 25168, 121262, 33673, 114773, 77592, 83471,
        ]],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Equihash is an asymmetric PoW based on the Generalised Birthday problem.",
        nonce: [0; 32],
        solutions: &[
            &[
                3130, 83179, 30454, 107686, 71240, 88412, 109700, 114639, 10024, 32706, 38019,
                113013, 18399, 92942, 21094, 112263, 4146, 30807, 10631, 73192, 22216, 90216,
                45581, 125042, 11256, 119455, 93603, 110112, 59851, 91545, 97403, 111102,
            ],
            &[
                3822, 35317, 47508, 119823, 37652, 117039, 69087, 72058, 13147, 111794, 65435,
                124256, 22247, 66272, 30298, 108956, 13157, 109175, 37574, 50978, 31258, 91519,
                52568, 107874, 14999, 103687, 27027, 109468, 36918, 109660, 42196, 100424,
            ],
        ],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Equihash is an asymmetric PoW based on the Generalised Birthday problem.",
        nonce: [
            1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                2261, 15185, 36112, 104243, 23779, 118390, 118332, 130041, 32642, 69878, 76925,
                80080, 45858, 116805, 92842, 111026, 15972, 115059, 85191, 90330, 68190, 122819,
                81830, 91132, 23460, 49807, 52426, 80391, 69567, 114474, 104973, 122568,
            ],
            &[
                16700, 46276, 21232, 43153, 22398, 58511, 47922, 71816, 23370, 26222, 39248, 40137,
                65375, 85794, 69749, 73259, 23599, 72821, 42250, 52383, 35267, 75893, 52152, 57181,
                27137, 101117, 45804, 92838, 29548, 29574, 37737, 113624,
            ],
        ],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Equihash is an asymmetric PoW based on the Generalised Birthday problem.",
        nonce: [
            2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            6005, 59843, 55560, 70361, 39140, 77856, 44238, 57702, 32125, 121969, 108032, 116542,
            37925, 75404, 48671, 111682, 6937, 93582, 53272, 77545, 13715, 40867, 73187, 77853,
            7348, 70313, 24935, 24978, 25967, 41062, 58694, 110036,
        ]],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Equihash is an asymmetric PoW based on the Generalised Birthday problem.",
        nonce: [
            10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                968, 90691, 70664, 112581, 17233, 79239, 66772, 92199, 27801, 44198, 58712, 122292,
                28227, 126747, 70925, 118108, 2876, 76082, 39335, 113764, 26643, 60579, 50853,
                70300, 19640, 31848, 28672, 87870, 33574, 50308, 40291, 61593,
            ],
            &[
                1181, 61261, 75793, 96302, 36209, 113590, 79236, 108781, 8275, 106510, 11877,
                74550, 45593, 80595, 71247, 95783, 2991, 99117, 56413, 71287, 10235, 68286, 22016,
                104685, 51588, 53344, 56822, 63386, 63527, 75772, 93100, 108542,
            ],
            &[
                2229, 30387, 14573, 115700, 20018, 124283, 84929, 91944, 26341, 64220, 69433,
                82466, 29778, 101161, 59334, 79798, 2533, 104985, 50731, 111094, 10619, 80909,
                15555, 119911, 29028, 42966, 51958, 86784, 34561, 97709, 77126, 127250,
            ],
            &[
                15465, 59017, 93851, 112478, 24940, 128791, 26154, 107289, 24050, 78626, 51948,
                111573, 35117, 113754, 36317, 67606, 21508, 91486, 28293, 126983, 23989, 39722,
                60567, 97243, 26720, 56243, 60444, 107530, 40329, 56467, 91943, 93737,
            ],
        ],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Equihash is an asymmetric PoW based on the Generalised Birthday problem.",
        nonce: [
            11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            1120, 77433, 58243, 76860, 11411, 96068, 13150, 35878, 15049, 88928, 20101, 104706,
            29215, 73328, 39498, 83529, 9233, 124174, 66731, 97423, 10823, 92444, 25647, 127742,
            12207, 46292, 22018, 120758, 14411, 46485, 21828, 57591,
        ]],
    },
    TestVector {
        params: Params { n: 96, k: 5 },
        input: b"Test case with 3+-way collision in the final round.",
        nonce: [
            0xf0, 0x07, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0,
        ],
        solutions: &[
            &[
                1162, 129543, 57488, 82745, 18311, 115612, 20603, 112899, 5635, 103373, 101651,
                125986, 52160, 70847, 65152, 101720, 5810, 43165, 64589, 105333, 11347, 63836,
                55495, 96392, 40767, 81019, 53976, 94184, 41650, 114374, 45109, 57038,
            ],
            &[
                2321, 121781, 36792, 51959, 21685, 67596, 27992, 59307, 13462, 118550, 37537,
                55849, 48994, 58515, 78703, 100100, 11189, 98120, 45242, 116128, 33260, 47351,
                61550, 116649, 11927, 20590, 35907, 107966, 28779, 57407, 54793, 104108,
            ],
            &[
                2321, 121781, 36792, 51959, 21685, 67596, 27992, 59307, 13462, 118550, 37537,
                55849, 48994, 78703, 58515, 100100, 11189, 98120, 45242, 116128, 33260, 47351,
                61550, 116649, 11927, 20590, 35907, 107966, 28779, 57407, 54793, 104108,
            ],
            &[
                2321, 121781, 36792, 51959, 21685, 67596, 27992, 59307, 13462, 118550, 37537,
                55849, 48994, 100100, 58515, 78703, 11189, 98120, 45242, 116128, 33260, 47351,
                61550, 116649, 11927, 20590, 35907, 107966, 28779, 57407, 54793, 104108,
            ],
            &[
                4488, 83544, 24912, 62564, 43206, 62790, 68462, 125162, 6805, 8886, 46937, 54588,
                15509, 126232, 19426, 27845, 5959, 56839, 38806, 102580, 11255, 63258, 23442,
                39750, 13022, 22271, 24110, 52077, 17422, 124996, 35725, 101509,
            ],
            &[
                8144, 33053, 33933, 77498, 21356, 110495, 42805, 116575, 27360, 48574, 100682,
                102629, 50754, 64608, 96899, 120978, 11924, 74422, 49240, 106822, 12787, 68290,
                44314, 50005, 38056, 49716, 83299, 95307, 41798, 82309, 94504, 96161,
            ],
        ],
    },
    TestVector {
        params: Params { n: 200, k: 9 },
        input: b"block header",
        nonce: [0; 32],
        solutions: &[&[
            4313, 223176, 448870, 1692641, 214911, 551567, 1696002, 1768726, 500589, 938660,
            724628, 1319625, 632093, 1474613, 665376, 1222606, 244013, 528281, 1741992, 1779660,
            313314, 996273, 435612, 1270863, 337273, 1385279, 1031587, 1147423, 349396, 734528,
            902268, 1678799, 10902, 1231236, 1454381, 1873452, 120530, 2034017, 948243, 1160178,
            198008, 1704079, 1087419, 1734550, 457535, 698704, 649903, 1029510, 75564, 1860165,
            1057819, 1609847, 449808, 527480, 1106201, 1252890, 207200, 390061, 1557573, 1711408,
            396772, 1026145, 652307, 1712346, 10680, 1027631, 232412, 974380, 457702, 1827006,
            1316524, 1400456, 91745, 2032682, 192412, 710106, 556298, 1963798, 1329079, 1504143,
            102455, 974420, 639216, 1647860, 223846, 529637, 425255, 680712, 154734, 541808,
            443572, 798134, 322981, 1728849, 1306504, 1696726, 57884, 913814, 607595, 1882692,
            236616, 1439683, 420968, 943170, 1014827, 1446980, 1468636, 1559477, 1203395, 1760681,
            1439278, 1628494, 195166, 198686, 349906, 1208465, 917335, 1361918, 937682, 1885495,
            494922, 1745948, 1320024, 1826734, 847745, 894084, 1484918, 1523367, 7981, 1450024,
            861459, 1250305, 226676, 329669, 339783, 1935047, 369590, 1564617, 939034, 1908111,
            1147449, 1315880, 1276715, 1428599, 168956, 1442649, 766023, 1171907, 273361, 1902110,
            1169410, 1786006, 413021, 1465354, 707998, 1134076, 977854, 1604295, 1369720, 1486036,
            330340, 1587177, 502224, 1313997, 400402, 1667228, 889478, 946451, 470672, 2019542,
            1023489, 2067426, 658974, 876859, 794443, 1667524, 440815, 1099076, 897391, 1214133,
            953386, 1932936, 1100512, 1362504, 874364, 975669, 1277680, 1412800, 1227580, 1857265,
            1312477, 1514298, 12478, 219890, 534265, 1351062, 65060, 651682, 627900, 1331192,
            123915, 865936, 1218072, 1732445, 429968, 1097946, 947293, 1323447, 157573, 1212459,
            923792, 1943189, 488881, 1697044, 915443, 2095861, 333566, 732311, 336101, 1600549,
            575434, 1978648, 1071114, 1473446, 50017, 54713, 367891, 2055483, 561571, 1714951,
            715652, 1347279, 584549, 1642138, 1002587, 1125289, 1364767, 1382627, 1387373, 2054399,
            97237, 1677265, 707752, 1265819, 121088, 1810711, 1755448, 1858538, 444653, 1130822,
            514258, 1669752, 578843, 729315, 1164894, 1691366, 15609, 1917824, 173620, 587765,
            122779, 2024998, 804857, 1619761, 110829, 1514369, 410197, 493788, 637666, 1765683,
            782619, 1186388, 494761, 1536166, 1582152, 1868968, 825150, 1709404, 1273757, 1657222,
            817285, 1955796, 1014018, 1961262, 873632, 1689675, 985486, 1008905, 130394, 897076,
            419669, 535509, 980696, 1557389, 1244581, 1738170, 197814, 1879515, 297204, 1165124,
            883018, 1677146, 1545438, 2017790, 345577, 1821269, 761785, 1014134, 746829, 751041,
            930466, 1627114, 507500, 588000, 1216514, 1501422, 991142, 1378804, 1797181, 1976685,
            60742, 780804, 383613, 645316, 770302, 952908, 1105447, 1878268, 504292, 1961414,
            693833, 1198221, 906863, 1733938, 1315563, 2049718, 230826, 2064804, 1224594, 1434135,
            897097, 1961763, 993758, 1733428, 306643, 1402222, 532661, 627295, 453009, 973231,
            1746809, 1857154, 263652, 1683026, 1082106, 1840879, 768542, 1056514, 888164, 1529401,
            327387, 1708909, 961310, 1453127, 375204, 878797, 1311831, 1969930, 451358, 1229838,
            583937, 1537472, 467427, 1305086, 812115, 1065593, 532687, 1656280, 954202, 1318066,
            1164182, 1963300, 1232462, 1722064, 17572, 923473, 1715089, 2079204, 761569, 1557392,
            1133336, 1183431, 175157, 1560762, 418801, 927810, 734183, 825783, 1844176, 1951050,
            317246, 336419, 711727, 1630506, 634967, 1595955, 683333, 1461390, 458765, 1834140,
            1114189, 1761250, 459168, 1897513, 1403594, 1478683, 29456, 1420249, 877950, 1371156,
            767300, 1848863, 1607180, 1819984, 96859, 1601334, 171532, 2068307, 980009, 2083421,
            1329455, 2030243, 69434, 1965626, 804515, 1339113, 396271, 1252075, 619032, 2080090,
            84140, 658024, 507836, 772757, 154310, 1580686, 706815, 1024831, 66704, 614858, 256342,
            957013, 1488503, 1615769, 1515550, 1888497, 245610, 1333432, 302279, 776959, 263110,
            1523487, 623933, 2013452, 68977, 122033, 680726, 1849411, 426308, 1292824, 460128,
            1613657, 234271, 971899, 1320730, 1559313, 1312540, 1837403, 1690310, 2040071, 149918,
            380012, 785058, 1675320, 267071, 1095925, 1149690, 1318422, 361557, 1376579, 1587551,
            1715060, 1224593, 1581980, 1354420, 1850496, 151947, 748306, 1987121, 2070676, 273794,
            981619, 683206, 1485056, 766481, 2047708, 930443, 2040726, 1136227, 1945705, 1722044,
            1971986,
        ]],
    },
    TestVector {
        params: Params { n: 200, k: 9 },
        input: b"block header",
        nonce: [
            1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                1505, 1380774, 200806, 1787044, 101056, 1697952, 281464, 374899, 263712, 1532496,
                264180, 637056, 734225, 1882676, 1112004, 2093109, 193394, 1459136, 525171, 657480,
                214528, 1221365, 574444, 594726, 501919, 1309358, 1740268, 1989610, 654491,
                1068055, 919416, 1993208, 17599, 1858176, 1315176, 1901532, 108258, 109600,
                1117445, 1936058, 70247, 1036984, 628234, 1800109, 149791, 365740, 345683, 563554,
                21678, 822781, 1423722, 1644228, 792912, 1409641, 805060, 2041985, 453824, 1003179,
                934427, 1068834, 629003, 1456111, 670049, 1558594, 19016, 1343657, 1698188,
                1865216, 45723, 1820952, 1160970, 1585983, 422549, 1973097, 1296271, 2006382,
                650084, 809838, 871727, 1080419, 28500, 1471829, 384406, 619459, 212041, 1466258,
                481435, 866461, 145340, 1403843, 1339592, 1405761, 163425, 1073771, 285027,
                1488210, 167744, 1182267, 1354059, 2089602, 921700, 2059931, 1704721, 1853088,
                585171, 739246, 747551, 1520527, 590255, 1175747, 705292, 998433, 522014, 1931179,
                1629531, 1692879, 588830, 1799457, 963672, 1664237, 775408, 1926741, 907030,
                1466738, 784179, 1972599, 1494787, 1598114, 1736, 1039487, 88704, 1302687, 579526,
                1476728, 1677992, 1854526, 432470, 2062305, 1471132, 1747579, 1521894, 1917599,
                1590975, 1936227, 151871, 1999775, 224664, 461809, 704084, 1306665, 1316156,
                1529628, 876811, 2086004, 1986383, 2012147, 1039505, 1637502, 1432721, 1565477,
                110385, 342650, 659137, 1285167, 367416, 2007586, 445677, 2084877, 285692, 1144365,
                988840, 1990372, 748425, 1617758, 1267712, 1510433, 152291, 1256291, 1722179,
                1995439, 864844, 1623380, 1071853, 1731862, 699978, 1407662, 1048047, 1849702,
                962900, 1083340, 1378752, 1534902, 11843, 115329, 454796, 548919, 148184, 1686936,
                862432, 873854, 60753, 999864, 385959, 1528101, 534420, 678401, 590419, 1962518,
                54984, 1141820, 243305, 1349970, 599681, 1817233, 1632537, 1698724, 580004, 673073,
                1403350, 2026104, 758881, 970056, 1717966, 2062827, 19624, 148580, 609748, 1588928,
                456321, 834920, 700532, 1682606, 20012, 441139, 1591072, 1923394, 194034, 1741063,
                1156906, 1983067, 20703, 1939972, 604581, 963600, 128170, 731716, 606773, 1626824,
                139460, 1386775, 521911, 2043473, 392180, 449532, 895678, 1453340, 7085, 598416,
                1514260, 2061068, 279532, 678363, 943255, 1405306, 119114, 2075865, 592839,
                1972064, 254647, 2078288, 946282, 1567138, 120422, 767626, 213242, 448366, 438457,
                1768467, 853790, 1509505, 735780, 1979631, 1461410, 1462050, 739008, 1572606,
                920754, 1507358, 12883, 1681167, 1308399, 1839490, 85599, 1387522, 703262, 1949514,
                18523, 1236125, 669105, 1464132, 68670, 2085647, 333393, 1731573, 21714, 637827,
                985912, 2091029, 84065, 1688993, 1574405, 1899543, 134032, 179206, 671016, 1118310,
                288960, 861994, 622074, 1738892, 10936, 343910, 598016, 1741971, 586348, 1956071,
                851053, 1715626, 531385, 1213667, 1093995, 1863757, 630365, 1851894, 1328101,
                1770446, 31900, 734027, 1078651, 1701535, 123276, 1916343, 581822, 1681706, 573135,
                818091, 1454710, 2052521, 1150284, 1451159, 1482280, 1811430, 26321, 785837,
                877980, 2073103, 107324, 727248, 1785460, 1840517, 184560, 185640, 364103, 1878753,
                518459, 1984029, 964109, 1884200, 74003, 527272, 516232, 711247, 148582, 209254,
                634610, 1534140, 376714, 1573267, 421225, 1265101, 1078858, 1374310, 1806283,
                2091298, 23392, 389637, 413663, 1066737, 226164, 762552, 1048220, 1583397, 40092,
                277435, 775449, 1533894, 202582, 390703, 346741, 1027320, 523034, 809424, 584882,
                1296934, 528062, 733331, 1212771, 1958651, 653372, 1313962, 1366332, 1784489,
                1542466, 1580386, 1628948, 2000957, 57069, 1398636, 1250431, 1698486, 57289,
                596009, 582428, 966130, 167657, 1025537, 1227498, 1630134, 234060, 1285209, 265623,
                1165779, 68485, 632055, 96019, 1854676, 98410, 158575, 168035, 1296171, 158847,
                1243959, 977212, 1113647, 363568, 891940, 954593, 1987111, 90101, 133251, 1136222,
                1255117, 543075, 732768, 749576, 1174878, 422226, 1854657, 1143029, 1457135,
                927105, 1137382, 1566306, 1661926, 103057, 425126, 698089, 1774942, 911019,
                1793511, 1623559, 2002409, 457796, 1196971, 724257, 1811147, 956269, 1165590,
                1137531, 1381215, 201063, 1938529, 986021, 1297857, 921334, 1259083, 1440074,
                1939366, 232907, 747213, 1349009, 1945364, 689906, 1116453, 1904207, 1916192,
                229793, 1576982, 1420059, 1644978, 278248, 2024807, 297914, 419798, 555747, 712605,
                1012424, 1428921, 890113, 1822645, 1082368, 1392894,
            ],
            &[
                13396, 1502141, 934546, 1419227, 445798, 1676403, 643830, 1421927, 45286, 1160795,
                117864, 542369, 501065, 1834465, 544881, 1258964, 157233, 888851, 1707333, 2042954,
                1067373, 1959382, 1081841, 1528092, 355787, 1506512, 488244, 1901282, 842029,
                1045169, 1014084, 1718668, 184257, 1419101, 572200, 1554883, 240034, 1489590,
                1108495, 1346106, 357644, 1206700, 1019151, 1817512, 827374, 945127, 885925,
                1320873, 292347, 918571, 436037, 973478, 321703, 1853464, 595802, 894629, 426733,
                849916, 1618173, 1877920, 1260413, 1913655, 1413450, 1821154, 39823, 934676,
                1415329, 1899092, 248682, 1500533, 603937, 2061626, 126829, 490133, 1491924,
                1591619, 474135, 1328233, 878943, 2058462, 86988, 911439, 767925, 1499098, 323431,
                335282, 1398512, 1561768, 142731, 1568252, 459703, 1378588, 443971, 730680, 723742,
                1301913, 120606, 402225, 659692, 878779, 967663, 1022156, 1573638, 1710098, 228789,
                483630, 565528, 1137688, 569834, 1100519, 1315274, 1613960, 323958, 1035040,
                342578, 1395004, 693886, 778875, 1128411, 1424459, 470124, 1001591, 1265290,
                1962023, 898247, 1156840, 1424257, 1463363, 29922, 1694756, 109027, 1777528,
                115450, 1525306, 1347575, 1835714, 279549, 1320423, 1162056, 1668629, 934706,
                1283078, 1115477, 1231121, 60882, 1677375, 729195, 1560584, 199789, 770485, 532152,
                1939788, 225610, 1517013, 1952643, 2085389, 453439, 1202000, 902342, 1303946,
                208859, 493534, 1185220, 1943780, 639093, 1123038, 1247020, 1359794, 354070,
                1207821, 463570, 650864, 846889, 875335, 1220142, 1929715, 222307, 849285, 859051,
                1961534, 419719, 1330637, 441693, 1566326, 590324, 1106956, 1198428, 1208601,
                1194514, 1714365, 1549673, 1766871, 36406, 315544, 313443, 1553541, 769731,
                1608444, 1457538, 1893815, 192649, 1030632, 282298, 846640, 287483, 336140, 541071,
                1079100, 139955, 404958, 1306603, 1734441, 843559, 1448208, 1273901, 1715116,
                547237, 1060287, 629301, 1036790, 733471, 1236082, 1073097, 1137292, 78721, 365289,
                321250, 730155, 505572, 1570719, 1272465, 1762855, 200602, 2002477, 376698, 586952,
                574825, 1774405, 1739907, 1910482, 321686, 1711532, 514504, 769967, 419504,
                1565290, 586517, 1474371, 394689, 802951, 1529816, 2003281, 1025904, 1789059,
                1557849, 1649570, 22351, 1020349, 799545, 1167424, 372784, 822777, 1331906,
                1487316, 147912, 779616, 503790, 591742, 831949, 1009009, 846119, 1154281, 160278,
                1306827, 972322, 1632998, 925417, 1862659, 1167562, 1487753, 225867, 1170797,
                595379, 1116885, 580973, 823382, 825674, 1756426, 123619, 578961, 1105801, 1478751,
                615784, 1248585, 1555596, 1823147, 291494, 1439342, 1362238, 2020172, 416541,
                808362, 1087192, 1279428, 145445, 1476821, 589962, 1007778, 502785, 578289,
                1347895, 1468692, 397887, 1422580, 873197, 1547340, 544937, 1706334, 1240996,
                1394517, 60961, 173017, 1198379, 1875710, 164983, 1244552, 786241, 1163907, 182496,
                445793, 765554, 1044380, 274547, 1626395, 1621315, 1632207, 168375, 924818,
                1355514, 1888896, 1060612, 1309397, 1247169, 2065604, 537737, 849561, 690965,
                1778198, 834911, 1341821, 1239610, 1468591, 90037, 516053, 906189, 1302107, 544896,
                1319300, 1944402, 2080316, 332213, 469952, 949830, 1187792, 400278, 459757,
                1306417, 1772258, 135309, 995973, 571189, 2041352, 375936, 389143, 1350844,
                1611928, 294058, 577712, 820473, 2062905, 435690, 1918441, 1160042, 1437969, 60304,
                817774, 956977, 1785565, 116153, 479573, 1291516, 1468918, 260814, 1568016, 695030,
                1082881, 1175273, 1679631, 1219376, 1680268, 173493, 2060876, 1391045, 1554572,
                795587, 931051, 1528751, 1810166, 1049000, 1089918, 1780849, 2080247, 1409007,
                1720471, 1726930, 2048510, 202301, 1229629, 910467, 1501208, 249207, 758814,
                386350, 1680387, 259000, 824989, 268126, 416050, 304924, 1411322, 534678, 883265,
                211439, 1915547, 1954195, 1987528, 682149, 1798395, 766421, 1964526, 345778,
                739906, 1698586, 1980612, 1207132, 1863904, 1586749, 1798519, 89627, 322371,
                1448894, 1821630, 771946, 845162, 1627288, 1848711, 247727, 1578777, 425393,
                1141980, 738940, 2054340, 1156205, 1662664, 315398, 956023, 867847, 935583, 559412,
                1538514, 1291871, 1371526, 925807, 2038575, 1099192, 1213875, 989415, 1590364,
                1137142, 1456911, 148404, 1829533, 171283, 355992, 231384, 1712830, 380050,
                1531904, 205155, 785766, 794141, 1821460, 536969, 826105, 915018, 1727720, 473495,
                575484, 1511034, 1752204, 1030559, 1173930, 1566670, 1684100, 545434, 1644431,
                838096, 1830099, 714438, 1058571, 986457, 1275490,
            ],
        ],
    },
    TestVector {
        params: Params { n: 200, k: 9 },
        input: b"block header",
        nonce: [
            2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                85, 2041581, 739509, 1038120, 95814, 1449199, 566808, 1970271, 22351, 1033277,
                351539, 378679, 370613, 1217658, 744902, 2054863, 128384, 2048133, 1422405,
                1711301, 266020, 338919, 1851784, 1923279, 344519, 939493, 1254831, 1365416,
                658643, 1827109, 742476, 2019543, 7557, 1416156, 42164, 1108616, 1324398, 1502720,
                1471471, 1734206, 51676, 532090, 634806, 1747514, 481844, 1488478, 690106, 1838033,
                93690, 1442016, 977262, 1136782, 239698, 1964439, 1032494, 2041403, 463135,
                1204579, 693303, 1522068, 880410, 2021579, 1108504, 1718764, 3462, 1916805,
                1727074, 1789966, 562318, 1651780, 1332270, 1995649, 295751, 2023013, 1119902,
                1690352, 1293091, 2056850, 1974345, 2044869, 78574, 899703, 1106267, 1286448,
                1303134, 1850087, 1355112, 1776010, 1031239, 1851498, 1153488, 1243952, 1163993,
                1977728, 1328544, 1612102, 9487, 233220, 998029, 1173368, 549226, 2073453, 871154,
                1572100, 46216, 739886, 1234167, 1572986, 374817, 878325, 910917, 1079476, 9548,
                961914, 1057590, 1411096, 973096, 1060957, 1188074, 1721366, 465242, 2055339,
                971225, 1830281, 526459, 2042659, 746133, 1985292, 7405, 1510070, 385903, 2095485,
                468941, 1679477, 757944, 1622263, 246823, 695851, 444054, 846202, 321170, 1678719,
                928172, 1531270, 13258, 342299, 639214, 1919221, 412214, 430924, 787608, 1968276,
                32804, 791991, 524319, 1083379, 568152, 1875970, 753609, 1958222, 44322, 324266,
                1072444, 1182703, 133944, 1208050, 900653, 1614070, 373367, 1363285, 663351,
                1459703, 578444, 1419137, 1163520, 1922722, 65157, 1631833, 1034031, 1487396,
                723173, 1724173, 1482982, 1644877, 384747, 909984, 1275503, 2036514, 610392,
                1093084, 913780, 1924334, 11137, 1546273, 61787, 295562, 319377, 2057614, 1229059,
                2010647, 209286, 1287454, 1013313, 1747506, 271940, 1520544, 1018674, 1063669,
                185227, 1219872, 1288529, 1548657, 344601, 1898125, 1755668, 1992858, 890818,
                1100957, 1565899, 1575128, 1207190, 1821158, 1999048, 2022807, 19362, 2055304,
                757990, 2088728, 478320, 1006345, 509532, 1966851, 160002, 648308, 414679, 1022972,
                528460, 1898952, 919894, 1918492, 154904, 1997802, 1528735, 1687070, 240714,
                1414676, 1400402, 1763165, 381766, 1044133, 619868, 1519386, 1248422, 1409298,
                1754871, 2015118, 1739, 499886, 1642104, 2069348, 437356, 609873, 491378, 1137963,
                89811, 1626714, 873752, 1548730, 1114856, 1941590, 1481869, 1625018, 59629, 668173,
                315591, 733560, 803171, 1801431, 1294776, 1914531, 253597, 1771037, 650342,
                1014718, 375289, 519529, 1447780, 1900126, 8241, 1229781, 777968, 1198408, 104296,
                2030372, 683340, 1454000, 91445, 100079, 645496, 824897, 392258, 1740230, 1525343,
                2069444, 110826, 1097701, 1069615, 1960595, 530572, 1028831, 999251, 1458171,
                146008, 1135021, 867825, 1398554, 397922, 818160, 587611, 1867232, 11088, 414753,
                572774, 2060307, 407170, 687100, 1002378, 1924055, 225264, 1608839, 792486,
                1925598, 470948, 519691, 700762, 1434860, 164901, 1277475, 377305, 1816065, 526937,
                1419265, 639397, 690184, 259943, 444998, 672324, 836053, 601877, 1693911, 1108479,
                1809555, 147947, 796744, 732775, 1441222, 325070, 1809776, 1873763, 2013982,
                481882, 1288648, 1653390, 1654906, 532739, 2062844, 758222, 1372565, 339507,
                1224640, 1392890, 1850326, 1130365, 1924596, 1177208, 1363642, 384241, 515152,
                1164040, 2004909, 609791, 1575213, 1671915, 1691266, 3039, 1774544, 200172, 273877,
                420816, 737235, 986055, 1164239, 165598, 265509, 1009133, 2062342, 758743, 1489470,
                1260158, 1924360, 208628, 1135455, 794209, 1067104, 469480, 1795800, 1183662,
                1360938, 335183, 822888, 831116, 2088169, 399584, 1836326, 1174096, 2034335, 95734,
                1427706, 1593344, 2070787, 305103, 459806, 1134106, 1581586, 304533, 1761123,
                454382, 1620968, 974160, 1661165, 1984968, 2006168, 143936, 1576427, 1420916,
                2050868, 239423, 1955755, 713829, 1553644, 613116, 653092, 957406, 1332874, 634343,
                1504804, 1539492, 1652920, 29255, 84313, 134872, 1722963, 936125, 1636028, 1518342,
                1910113, 74089, 1517035, 141099, 1837859, 91886, 1841153, 483590, 1276988, 94868,
                209194, 613253, 1062768, 289463, 1150432, 1216070, 2086920, 226473, 1630691,
                482394, 1837175, 389596, 2002601, 395772, 870173, 43107, 688649, 936340, 1235157,
                189041, 1855656, 597803, 1251423, 472775, 1688197, 1286637, 1760949, 930937,
                1072689, 1187497, 1784673, 58620, 1436417, 146777, 1677387, 66982, 746844, 945993,
                1703252, 347963, 945075, 445864, 1694069, 946355, 1646534, 1769893, 1806674,
            ],
            &[
                2280, 1675737, 1241864, 1426081, 529325, 1356538, 1546188, 2018466, 113218,
                1885133, 750288, 1896938, 785567, 802607, 1597047, 1985969, 132292, 1612427,
                551147, 1732380, 1140541, 1246254, 1371957, 1567864, 369405, 1582447, 1726106,
                1947007, 435161, 1369789, 928581, 1556123, 241507, 1653097, 395601, 975278, 633072,
                1541996, 1250446, 1740729, 545122, 1930170, 980220, 1098305, 1158689, 1369613,
                1570322, 1726377, 438386, 783277, 968764, 1057094, 559257, 1187476, 1228488,
                2074064, 813312, 1810708, 1064164, 2087729, 923610, 1552562, 1327854, 1735362,
                32630, 1981975, 310780, 1158178, 263597, 363824, 2052751, 2073086, 45706, 847451,
                584418, 813295, 716033, 968866, 854478, 1868422, 594854, 1676760, 1410774, 2055426,
                661611, 1138770, 997952, 1309381, 984769, 1370253, 1649486, 1920232, 1080026,
                1654268, 1212179, 1834060, 58487, 971078, 424085, 1175474, 687490, 1317807, 713352,
                1985958, 142307, 1854880, 1309882, 1540711, 487396, 904606, 975430, 1385196, 88528,
                1099752, 372012, 1708451, 207227, 1674648, 1476751, 1547086, 138190, 738504,
                779891, 1107444, 505099, 1265858, 613613, 1884841, 17621, 1157648, 209013, 526174,
                971607, 1004381, 1202861, 1494745, 274131, 982841, 729228, 886096, 478622, 1293202,
                539968, 885395, 152578, 1647348, 494562, 1327036, 342817, 1698049, 725707, 1547591,
                767029, 1290077, 1546025, 1736585, 1219491, 1852307, 1555669, 1883327, 61829,
                813247, 482047, 1362746, 93496, 1467091, 1070897, 1559668, 305281, 690664, 326883,
                444914, 443937, 1762042, 614124, 1309010, 148533, 1571755, 497978, 2074730,
                1545845, 1666088, 1757232, 1900305, 189111, 802199, 203091, 881152, 926582,
                1675352, 1478644, 1677015, 20277, 435117, 396319, 834104, 370396, 1445594, 1161835,
                2054329, 230752, 644229, 568858, 1963813, 872483, 974796, 984693, 1105289, 94040,
                1781444, 278075, 1901607, 165376, 834499, 951353, 1932215, 146197, 664541, 383107,
                1743858, 287583, 1810757, 570459, 1739938, 24296, 1527677, 1742586, 2000245,
                392111, 1596429, 915955, 1501951, 590908, 1689547, 752882, 1853220, 749276,
                1941184, 1507459, 1578707, 167457, 1313516, 428750, 1165032, 324442, 368759,
                1283775, 2017161, 364763, 2053902, 905316, 1800528, 581102, 2050600, 818573,
                1762293, 2711, 622959, 813485, 831354, 41471, 1324329, 862647, 1007821, 26246,
                1120632, 1156719, 1215948, 907527, 1144579, 1042530, 1287508, 138588, 1538967,
                1265927, 1735492, 229904, 1039415, 999131, 1826370, 392686, 730051, 623787,
                2047295, 409449, 1711230, 462385, 1992127, 42656, 880450, 42729, 1973289, 479692,
                1993383, 673152, 1885841, 170786, 748129, 521360, 818751, 982929, 1234321, 1113308,
                1907714, 98953, 1728051, 947493, 1289327, 199255, 1474247, 681622, 1416365, 352728,
                1796749, 603909, 811763, 946618, 1104470, 973691, 1152770, 21297, 639834, 594075,
                1017433, 133138, 630545, 537386, 1347734, 365214, 844135, 1341949, 1460424, 673293,
                758707, 754735, 1456846, 40018, 993218, 91092, 1539083, 1526483, 1757364, 1595990,
                1598593, 230413, 1897770, 538469, 1395634, 396644, 1893699, 442435, 571726, 52013,
                1125704, 1098095, 2080341, 200259, 2046061, 1241415, 1755598, 573138, 735184,
                795832, 1567959, 680511, 1310894, 1103029, 1516884, 135655, 1326571, 692790,
                1190347, 397690, 1163996, 793521, 1677407, 307698, 1644146, 476490, 480901, 939619,
                1485684, 1154733, 1255691, 3690, 219420, 282792, 439050, 145272, 576914, 712049,
                1304645, 573928, 1772866, 591113, 1393852, 1035141, 1950385, 1660238, 2048950,
                156755, 1608179, 1548683, 1672961, 305784, 1862688, 321105, 1025297, 452008,
                1005531, 843560, 1190325, 856621, 1117370, 1130365, 1527816, 49720, 747725, 88191,
                532153, 387221, 2046361, 562281, 1174973, 58051, 665523, 1087404, 1953295, 288049,
                2095453, 843437, 1391132, 71028, 684791, 905101, 983353, 869595, 952262, 1639398,
                1914119, 419401, 1543571, 1072120, 1589356, 1156347, 1293818, 1377687, 1462379,
                15074, 1544101, 82479, 277248, 608805, 980975, 627710, 2071408, 210587, 2050837,
                837017, 1832082, 1225589, 1331877, 1546243, 1710461, 263463, 1118404, 1070140,
                1965733, 573307, 1351499, 983779, 1981322, 606434, 1595416, 765946, 1106775,
                909539, 1338917, 1288935, 1474260, 360272, 448135, 848529, 1128620, 425058,
                1408729, 552440, 908024, 536460, 1031151, 1355099, 1690286, 758818, 965662,
                1568718, 1811172, 394608, 1421319, 528521, 983018, 1098180, 2033658, 1555936,
                2016847, 558752, 1627758, 1319354, 1973293, 844477, 2092434, 1252290, 1572207,
            ],
        ],
    },
    TestVector {
        params: Params { n: 200, k: 9 },
        input: b"block header",
        nonce: [
            10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                4864, 1199590, 193812, 1249880, 714671, 1837456, 1535571, 1708457, 232772, 1454167,
                457525, 637002, 332079, 1501386, 718273, 1615866, 77066, 484710, 167020, 1302858,
                478350, 1147611, 1080786, 1765391, 192941, 989350, 946203, 2030362, 741168,
                1308632, 981242, 1278097, 37040, 342963, 569456, 668433, 603930, 933078, 698729,
                1622250, 64884, 1692110, 592064, 1876950, 1033063, 1611191, 1595251, 1620759,
                85174, 1366524, 780855, 1565061, 499859, 1083320, 659353, 2024776, 245240, 653208,
                610593, 1607404, 692246, 1235766, 1256907, 1797417, 50473, 131951, 1598065,
                1624695, 1111152, 1515152, 1388781, 1891337, 160469, 432196, 393547, 812762,
                176550, 1413868, 509501, 1271887, 318995, 1437575, 991689, 2006157, 539568,
                1719313, 794460, 1908039, 535401, 1235620, 1455510, 1626953, 1091062, 1782601,
                1467126, 1580102, 170783, 1348866, 1353402, 1491258, 772707, 1966772, 826506,
                1152761, 449546, 1960316, 1722182, 2080464, 585763, 1674095, 609247, 843509,
                172788, 1720636, 435897, 1922357, 500566, 1040796, 613483, 1370281, 256465,
                1230426, 769634, 1233698, 338802, 1256346, 1127412, 1606391, 28572, 1971791,
                1444448, 1918707, 97182, 1965648, 257599, 1202977, 93470, 966723, 905279, 1233897,
                113192, 1584168, 1161311, 2032889, 256253, 1722369, 1073588, 1855590, 346680,
                1584579, 1743391, 1934763, 312281, 1549608, 994193, 1602606, 387880, 725528,
                934703, 1266574, 65484, 576232, 286914, 1159487, 67947, 120057, 1292895, 1703617,
                78516, 561032, 324727, 964901, 207979, 1061901, 669782, 1333235, 206098, 1887692,
                556487, 1825223, 311381, 1950933, 346751, 900814, 428287, 460877, 839356, 2060346,
                812004, 1046964, 1855974, 2094549, 104606, 743195, 954206, 1215739, 741600,
                1861587, 743395, 1346010, 494866, 1045735, 519272, 678086, 1500989, 1559455,
                1804386, 1954175, 125590, 1395720, 187846, 573761, 537850, 1166248, 1075068,
                1546494, 227070, 2020913, 1609765, 1905314, 387408, 1087195, 506841, 1499006,
                139388, 1837001, 877345, 1809095, 1352203, 1418350, 1850889, 1990899, 280451,
                1765615, 510671, 1352059, 764606, 1764448, 926933, 1636061, 211736, 1525591,
                655004, 1579428, 751390, 1914755, 1108881, 1741132, 312225, 1280938, 1278149,
                1812658, 1150817, 1667245, 1332384, 1891064, 9140, 1966916, 777375, 1545630,
                490282, 1629876, 1169924, 1800146, 343120, 369449, 1598222, 1975938, 1275395,
                1417808, 1349883, 1709635, 248136, 1064213, 248531, 419620, 395583, 934164, 957401,
                1441780, 436644, 1282126, 1185318, 1225662, 793359, 1337722, 1738888, 1910757,
                77536, 946595, 193413, 1714318, 245074, 944172, 433226, 1320914, 251395, 474279,
                837087, 1103199, 297673, 606529, 657996, 1316189, 115773, 1039045, 677050, 1570537,
                293787, 644796, 1550861, 1957774, 601959, 1591943, 1745446, 2025220, 1240950,
                1633250, 1879694, 2058372, 60446, 1323729, 575091, 1342903, 807201, 1631118,
                980227, 1144536, 105511, 2067126, 618548, 1233793, 676117, 1129668, 1416791,
                1774930, 106539, 1150242, 1145224, 1200128, 805479, 1751155, 995027, 1982253,
                767482, 1244117, 944753, 2047440, 1095507, 1299247, 1460212, 2038990, 88843,
                530639, 646346, 1179485, 1044312, 1797756, 1456669, 1549970, 496644, 1959677,
                822589, 1619867, 671946, 2071372, 839018, 1504389, 115789, 175266, 1467790,
                1972030, 1513638, 1832563, 1563718, 1897413, 203986, 391698, 1340000, 1715426,
                1050764, 1249824, 1276431, 2015035, 62131, 1545007, 525280, 717401, 177592, 661746,
                348866, 1689238, 420259, 632760, 1244376, 1935559, 465968, 1601759, 1732708,
                1760778, 99049, 302037, 183591, 822581, 196077, 680305, 1585363, 2091013, 383849,
                437456, 571005, 1266155, 611968, 1457147, 868500, 1231186, 147047, 1237994, 240469,
                1095717, 267068, 1421991, 431598, 1915282, 445827, 525511, 1327175, 1774033,
                716456, 1233031, 1061413, 1122461, 206655, 572078, 924087, 1310789, 684611,
                1287277, 1773797, 1913313, 309030, 1878386, 473275, 1003742, 1260118, 1576334,
                1318332, 1864421, 121871, 254982, 1668894, 1981433, 720578, 1301056, 935612,
                1117955, 497019, 1086159, 879102, 2090471, 872907, 1471132, 1837356, 1946140,
                132945, 1223450, 983306, 1258235, 211937, 884317, 776845, 1230188, 256819, 1715032,
                1175550, 1373727, 546648, 1594562, 1079893, 2013428, 121905, 419443, 1270708,
                2001104, 231117, 1687963, 581051, 755823, 150994, 201680, 277505, 1571629, 210684,
                267883, 346662, 1369722, 210410, 450237, 889519, 1927159, 428761, 1261947, 1112506,
                2072336, 328126, 919149, 422720, 523141, 480263, 948885, 888698, 1228888,
            ],
            &[
                23901, 617413, 355244, 1975506, 132019, 973669, 1226248, 1573681, 122421, 1065428,
                582124, 909665, 558651, 1926639, 991115, 1811101, 53484, 471380, 1166430, 1172099,
                768898, 1980136, 1308533, 2043797, 225770, 1560246, 282139, 1511423, 252319,
                1591786, 1281863, 1792727, 62057, 1262311, 152547, 1040143, 854194, 1671967,
                1041149, 1607891, 65257, 1134934, 1022871, 1271798, 1447250, 1983171, 1491959,
                1874069, 179856, 1219906, 1267725, 1654491, 735071, 939234, 766437, 900743, 430964,
                2070358, 1146633, 1654102, 694284, 1822630, 762226, 1448725, 43801, 1286582,
                1375355, 2031392, 904812, 1027586, 1334970, 1596137, 1178798, 1845585, 2024912,
                2075007, 1327104, 1704913, 1924277, 2050791, 213166, 509295, 797674, 1025109,
                844789, 1735309, 1228897, 1966440, 726212, 789029, 853855, 1647548, 924001,
                1849322, 1783876, 2001548, 302290, 1172889, 501308, 2003083, 742289, 1147883,
                808789, 1707834, 681978, 1238187, 1467872, 1679417, 854573, 1431629, 2053677,
                2085589, 473258, 1062845, 1237630, 1794734, 1037815, 2094316, 1495253, 1743060,
                772774, 1993150, 1098941, 1165463, 812798, 845435, 1604066, 1982214, 36051, 613993,
                1171428, 1458641, 282798, 328217, 1168775, 1871314, 238601, 1759957, 1307623,
                1970904, 281444, 294479, 348563, 1135891, 88431, 1319495, 453854, 657030, 343548,
                1764131, 1061870, 1704218, 260179, 345854, 1307098, 1823763, 602183, 1577697,
                1809954, 2027412, 51269, 57467, 1325003, 1335582, 1311661, 1392464, 1684355,
                2053786, 534916, 1468056, 1606406, 1802740, 1162295, 1458329, 1580464, 1802771,
                62963, 1265622, 1079825, 1523318, 697498, 1137974, 1153192, 1248533, 129604,
                1178809, 1073871, 1104755, 311330, 517501, 535836, 1379634, 40198, 647811, 675812,
                936605, 486329, 765127, 775567, 1414124, 613964, 1577815, 683996, 1689517, 996979,
                2083259, 1556180, 2058600, 210016, 1789429, 275149, 2088979, 726542, 1285888,
                939385, 1301015, 305279, 339990, 307825, 523852, 332361, 1577829, 914883, 1501568,
                67628, 390418, 842350, 1733296, 1075292, 1541991, 1118111, 1412896, 133657, 421233,
                334008, 1150183, 617485, 1236606, 787610, 1451290, 179174, 1512540, 554916,
                1239556, 543320, 623168, 668527, 836286, 288147, 724320, 632809, 1666001, 989270,
                1332112, 1491347, 1690153, 47022, 628361, 1666493, 1972048, 521980, 1695996,
                1230445, 1557971, 107339, 1669410, 441113, 1464999, 675537, 2082149, 967630,
                1727034, 73959, 1283937, 1221350, 1586488, 532533, 2054356, 1372304, 1965748,
                276873, 623244, 439869, 527242, 532370, 861699, 1128671, 1814005, 81006, 451273,
                906992, 1525688, 892238, 1673990, 1173231, 1289145, 361337, 1728127, 1240059,
                1744405, 800364, 1979466, 1166409, 1340859, 185949, 556989, 600344, 692557, 316208,
                1531398, 545306, 1748454, 225612, 1139376, 646851, 1064772, 1272849, 1363216,
                1646428, 1770462, 54905, 1005365, 805801, 1395824, 75735, 1795449, 912629, 1502495,
                188676, 351070, 828616, 1590802, 406154, 1290478, 1172204, 1600863, 130475, 598371,
                612509, 784904, 489833, 563167, 504536, 1887655, 963575, 1812104, 1618265, 1771485,
                982915, 1024970, 1728069, 1928492, 83664, 988553, 347128, 1880498, 212168, 1305561,
                1862267, 1899554, 194973, 1507295, 940166, 1752636, 251583, 2049162, 692749,
                762955, 118916, 1119413, 274739, 470862, 292880, 414786, 1218416, 1709535, 279622,
                1285940, 469442, 1987188, 675485, 740244, 1341026, 1852022, 59670, 1259557, 284173,
                2062010, 483778, 1897192, 1651813, 1718729, 388128, 957145, 1285996, 1831671,
                497806, 1832924, 559068, 784092, 170059, 1212079, 237095, 734694, 767545, 871328,
                1197522, 1369692, 221296, 1792535, 907705, 1233817, 571488, 2033222, 636603,
                1104823, 354658, 1213051, 1424476, 1684826, 643531, 1615184, 659947, 1061345,
                412620, 605072, 904987, 1590212, 1558823, 1587538, 1785968, 2088976, 452351,
                1338442, 460036, 616323, 857148, 1950194, 1087766, 1868668, 558337, 1358354,
                636084, 788194, 566027, 675396, 1825562, 2095311, 63285, 1910522, 709285, 1519032,
                167798, 474629, 225257, 1897035, 155141, 2043903, 959984, 1559487, 698805, 1800434,
                1062227, 1271147, 144322, 1580619, 1386291, 1521451, 852563, 957301, 1446230,
                1523630, 364335, 2071342, 1235960, 1310200, 449297, 601907, 634608, 2014188, 81019,
                839298, 474427, 1831684, 210231, 1370197, 1261151, 1816924, 329886, 699000, 372746,
                1891547, 671945, 1301809, 873541, 1034843, 377922, 680790, 1280670, 1510355,
                771245, 1966090, 1483940, 2001054, 426637, 1257587, 815969, 1277447, 631165,
                722596, 1283260, 1948358,
            ],
        ],
    },
    TestVector {
        params: Params { n: 200, k: 9 },
        input: b"block header",
        nonce: [
            11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            4069, 463738, 457648, 1094395, 353041, 845577, 1338264, 1960371, 269620, 856637,
            560213, 877722, 450359, 826410, 714399, 1983540, 126148, 1080255, 1138998, 1761600,
            427345, 1932802, 881882, 2068285, 447232, 829316, 903027, 1193156, 541454, 1521796,
            1078148, 1889459, 124993, 1347183, 581805, 1443350, 179226, 1577228, 651270, 1325494,
            683884, 1089322, 793100, 1463641, 1237884, 1941965, 1796434, 1863807, 230979, 828024,
            1428386, 1491953, 711293, 1450044, 951912, 1655589, 756010, 1309938, 1041860, 1350970,
            814780, 1539264, 1035122, 1455759, 6420, 774570, 1625325, 1729420, 753562, 1103469,
            829724, 1258289, 568974, 756682, 583406, 738962, 570441, 658047, 1879798, 1920132,
            288029, 716348, 771535, 1896895, 750194, 1355985, 1833382, 1937010, 445480, 519375,
            1044543, 1447869, 684723, 1795442, 760755, 1087503, 27203, 401767, 515774, 2096530,
            220510, 1531978, 682810, 1202695, 102739, 159328, 249040, 1376984, 714328, 1532836,
            1849127, 1900521, 64133, 118448, 1010819, 1789329, 1399572, 1772831, 1485143, 2060346,
            128615, 1309550, 1573721, 1746738, 757879, 1130173, 793709, 1847068, 44228, 228896,
            412976, 1276115, 293492, 737005, 1674045, 1944525, 331939, 1510392, 369242, 1077155,
            426460, 1673372, 431032, 1274877, 60341, 294808, 695707, 2027632, 240042, 1252879,
            1725057, 1913005, 313836, 526303, 515786, 1468016, 545971, 1193874, 875617, 1497527,
            112951, 733634, 1406066, 1866156, 476895, 1582936, 1613761, 1810957, 555593, 1637664,
            1205103, 2010551, 801136, 1350946, 1416652, 1881050, 251209, 1831040, 485897, 1321291,
            526290, 759360, 833919, 1197480, 275949, 437926, 1352279, 1907841, 1174293, 1232730,
            1591652, 1724868, 64129, 638812, 164647, 1927780, 226966, 1708268, 725951, 1398329,
            404993, 1261809, 933394, 1045040, 448233, 673005, 481885, 1180107, 135281, 1803975,
            1109497, 1803585, 532625, 1135255, 1119381, 1966487, 557305, 2051233, 615421, 1411567,
            610639, 1787653, 1241629, 1372160, 127977, 1274377, 556987, 822140, 886894, 1502085,
            1317350, 1334492, 221984, 990436, 1138067, 1488903, 525849, 1181021, 1763583, 1797031,
            391839, 736791, 1471289, 1549100, 483303, 750308, 1537541, 1566177, 659853, 1733147,
            864458, 1431423, 1528133, 1779129, 1945881, 2012012, 7510, 2047486, 1071115, 1190891,
            209477, 1579776, 452538, 1743654, 61983, 1504258, 1687339, 2091843, 336350, 524705,
            1133333, 1162168, 20622, 107880, 657023, 1441283, 352745, 1959673, 1253812, 1948787,
            57245, 2008612, 128314, 429920, 106537, 2057002, 2060106, 2090515, 15120, 1229368,
            1691769, 1924728, 90639, 562555, 626612, 1794414, 218678, 1909493, 980759, 1591385,
            714695, 1440327, 1320404, 1828751, 84296, 1186698, 440022, 1235700, 576284, 1694165,
            1568289, 2002405, 956662, 1163003, 1235075, 1791789, 1364965, 1669818, 1464088,
            1574228, 47568, 911259, 975879, 1880881, 98599, 303565, 1387907, 1576200, 92625,
            1959308, 333801, 1231633, 772862, 1284483, 1534241, 2013255, 74617, 1025792, 1135731,
            1451877, 473457, 1073612, 1045423, 1746842, 494445, 1703635, 1306798, 2003521, 949685,
            1927757, 1496880, 1857562, 161571, 1044916, 640458, 1053372, 719774, 1292407, 1131831,
            1741201, 374920, 1893201, 915430, 2028608, 679984, 1165018, 1065417, 2046590, 464822,
            1353906, 810126, 1433305, 882328, 1630701, 1519924, 1596363, 560399, 2011590, 1306858,
            1629806, 1287457, 1615912, 1712644, 1924703, 7943, 1336360, 1610242, 1822737, 474625,
            2088181, 491226, 2067675, 200602, 1281328, 1025938, 1898799, 697976, 1208680, 863807,
            1728279, 235165, 1134723, 1062949, 1834188, 1078943, 1832179, 1383472, 2066945, 278003,
            1551243, 328896, 1274678, 329449, 894853, 1807715, 2007736, 37987, 878450, 1503193,
            1885025, 82368, 1588984, 205464, 1958945, 352190, 581519, 977218, 1948110, 605118,
            1616091, 1170257, 1979591, 350625, 935037, 1171330, 1579630, 503298, 1825558, 667693,
            1930990, 406035, 475116, 840775, 1489431, 669255, 1365102, 1615968, 1714470, 37008,
            1765323, 694838, 1838285, 1254886, 1713979, 1376019, 1683443, 189227, 2040007, 212830,
            1846721, 328541, 675639, 1117953, 1173356, 174554, 1453766, 1016781, 1380416, 284565,
            916510, 770336, 1613349, 313668, 622218, 1284478, 1831739, 404140, 728071, 834045,
            2069311, 51289, 1600412, 412477, 2062451, 130962, 2053156, 465929, 709254, 117855,
            1392948, 136673, 374064, 121591, 1688669, 846029, 994804, 675059, 1448777, 1045103,
            1240057, 816462, 1499323, 1890697, 1896908, 826192, 959241, 833980, 1301853, 1149691,
            1227108, 1164702, 1520364,
        ]],
    },
    TestVector {
        params: Params { n: 144, k: 5 },
        input: b"block header",
        nonce: [0; 32],
        solutions: &[
            &[
                592534, 16727887, 7453057, 25925862, 3112444, 22940957, 11281555, 31775301,
                1334223, 20443726, 11070438, 27290152, 4163350, 8213747, 9315696, 19739115,
                1204738, 23545872, 1776094, 13506389, 6697536, 27749507, 11388567, 14622750,
                4026870, 14622947, 8538779, 27133048, 11652285, 21221152, 22429643, 26529065,
            ],
            &[
                893099, 8838806, 28398733, 31357275, 16596368, 25123776, 18326148, 31682454,
                924167, 27761424, 20546064, 30880786, 2931034, 11343701, 17011529, 26876917,
                4915668, 8097132, 17630254, 19828133, 5205703, 15014329, 13248799, 31182371,
                7887075, 22909946, 28758238, 31473391, 14791659, 33348545, 23436578, 26267836,
            ],
            &[
                1948823, 6927010, 5051182, 16853572, 7567151, 8174004, 9697548, 30082354, 4126978,
                11219458, 12046931, 26296269, 6960990, 7513282, 15641819, 29553952, 2075509,
                3917596, 26506206, 32423116, 20172796, 26046597, 21008102, 32605968, 7733247,
                28951159, 19401173, 22240259, 12527355, 25816053, 26924563, 30167801,
            ],
        ],
    },
    TestVector {
        params: Params { n: 144, k: 5 },
        input: b"block header",
        nonce: [
            1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                370176, 12908777, 1114179, 27164301, 6258700, 25604518, 23849263, 25098550,
                3874837, 22260519, 6421829, 20746376, 9010370, 14958301, 11701370, 20286183,
                3453033, 22917202, 17399732, 25201320, 12365907, 25599116, 12861876, 16581537,
                6291684, 17504753, 17494629, 17928408, 10119629, 10615318, 17868827, 20213583,
            ],
            &[
                582263, 3783052, 2313999, 19478261, 1954747, 14513744, 5696384, 9983371, 770696,
                25399708, 2469656, 31060031, 1409486, 25011708, 6197016, 24800042, 4526208,
                20923264, 22532911, 24458988, 19054856, 19620962, 21223763, 25258694, 5339436,
                15681349, 11143785, 21451088, 8434833, 30577236, 27811311, 32663733,
            ],
            &[
                635733, 25222820, 21014930, 29574076, 1000985, 5604521, 6974734, 19935829, 3041402,
                6498908, 27180330, 29522758, 3065872, 28403257, 5814381, 33337207, 1920304,
                16178841, 24948948, 25474220, 14568607, 30131615, 16282584, 28097350, 6277286,
                20609353, 13688741, 20448955, 8669674, 28133172, 18969419, 33014245,
            ],
            &[
                1784595, 8730569, 2952232, 8311088, 3848398, 24535350, 6741302, 15864803, 5653320,
                16018355, 17835034, 29486303, 5823367, 20140719, 7233264, 33483182, 3117353,
                20053611, 3338894, 15846604, 7165521, 28162236, 8412349, 11018248, 7341551,
                18365873, 16351743, 22192468, 8662075, 9732645, 14238971, 22027130,
            ],
            &[
                1791926, 8318711, 26251202, 32356717, 6997365, 25735638, 21576954, 30111878,
                3898334, 19905391, 5033991, 16030336, 5245813, 26522082, 5669465, 16635645,
                8277609, 22422842, 13069153, 29511907, 20365907, 23921315, 24326546, 32342867,
                12058103, 23466254, 19021516, 19329156, 15273796, 15658582, 15782868, 30953403,
            ],
        ],
    },
    TestVector {
        params: Params { n: 144, k: 5 },
        input: b"block header",
        nonce: [
            2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[
            &[
                631838, 32379030, 12115828, 15370934, 1071098, 28542374, 3749356, 23094728,
                1030877, 4102154, 3296262, 16677836, 7373429, 23553272, 13706818, 22718294,
                1600870, 2009968, 24236940, 26722391, 3296672, 30961726, 8361013, 20154770,
                3094572, 28709268, 6668495, 32281682, 11480232, 24080407, 21721486, 26351116,
            ],
            &[
                2024468, 30788885, 16549044, 31105157, 10766172, 27803398, 14188383, 18350597,
                8340166, 12112117, 9771703, 16475394, 15638163, 19852515, 16164133, 21283881,
                3012382, 10164383, 4371003, 27267590, 4579840, 32997246, 17142413, 27563106,
                4959833, 19397820, 7489484, 26132602, 7957443, 27721944, 26669199, 27861139,
            ],
            &[
                5378620, 10759970, 17807788, 29226493, 11529006, 22674062, 17704747, 23436136,
                10872275, 25829134, 15459988, 21678082, 17603136, 22657822, 22774669, 23569569,
                6492083, 20372131, 27398382, 33053456, 21986403, 23346432, 29327458, 33052852,
                13637567, 26765408, 26834306, 29589598, 17363888, 31088383, 17860587, 20580709,
            ],
        ],
    },
    TestVector {
        params: Params { n: 144, k: 5 },
        input: b"block header",
        nonce: [
            10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[],
    },
    TestVector {
        params: Params { n: 144, k: 5 },
        input: b"block header",
        nonce: [
            11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0,
        ],
        solutions: &[&[
            911662, 22138389, 8210265, 31274530, 8029780, 20878462, 18256796, 24246891, 1935509,
            22500647, 18385714, 21573406, 5314654, 11279996, 7578895, 12470048, 3573289, 16335834,
            8230824, 25830081, 4414521, 7228234, 20359437, 21115537, 11102213, 12353678, 19277545,
            26893604, 13111251, 30773720, 14408826, 26047501,
        ]],
    },
];
